<?php
/*
*
* BEGIN about.php
*
*
* Dazzler Presenter - About Page
* @Description: Presents the main page
* @Authors: Salman Noor, Wits University
* @Copyright: © Wits University 2011 - All Rights Reserved
* @License: BSD License (http://www.linfo.org/bsdlicense.html)
*
*
* BEGIN CHANGELOG
* Developers working on thee files are REQUIRED to maintain this CHANGELOG.
* Please ensure you follow the Changelog Guidelines: http://code.google.com/p/dazzler/wiki/DazzlerDevelopGuideline?ts=1315476570&updated=DazzlerDevelopGuideline
* !==================================================================================================================================================================
*
* VERSION 1.0.0
*	+ Created, Salman, 21 September 2011
*
* ==================================================================================================================================================================!
* END CHANGELOG
*/


/*******************************************************************************************************************************************************************
*
* BEGIN Direct Call Check
*
/******************************************************************************************************************************************************************/
global $doNotCallThisScriptDirectly;
if ($doNotCallThisScriptDirectly != 1)
{
	/* Read the ini language file */
	$ini_lang_array = array();
	$clientlang = explode(",", strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
	$lang_ini_array = (file_exists("lang/" . trim($clientlang[0]) . ".ini")) ? parse_ini_file("lang/" . trim($clientlang[0]) . ".ini", true) : parse_ini_file("lang/en.ini", true);
	die ($lang_ini_array['ERRORS']['doNotCallThisScriptDirectly']);
}
/*******************************************************************************************************************************************************************
*
* END Direct Call Check
*
/******************************************************************************************************************************************************************/


/*******************************************************************************************************************************************************************
* BEGIN declare custom variables used in templates/about.php
/******************************************************************************************************************************************************************/
	$css_head = "";
        $js_head = "";
        $footerString="";
        $leftColumnContent="";
        $mainContent="";
        $modalWindowContent="";

$parsesiteconfig = new parsesiteconfig();
$defaultWebTheme = $parsesiteconfig->getDefaultWebTheme();


        $css_head = $parsesiteconfig->getjQueryUICSSFilesForSetTheme();

        $cm = new fetchpathitems($path . "/sites/dazzler/themes/$loadType/custom/styles/main/", "css");

	foreach($cm->cm as $includeCssFile)
	{
            $css_head .= "<link rel='stylesheet' type='text/css' href='$rootpath/themes/$loadType/custom/styles/main/$includeCssFile' />";
	}

	$cm = new fetchpathitems($path . "/sites/dazzler/themes/$loadType/global/scripts", "js");

	foreach($cm->cm as $includeJsFile)
	{
		$js_head .= "<script src='$rootpath/themes/$loadType/global/scripts/$includeJsFile'></script>\n";
	}

        $cm = new fetchpathitems($path . "/sites/dazzler/themes/$loadType/custom/scripts/main", "js");

	foreach($cm->cm as $includeJsFile)
	{
		$js_head .= "<script src='$rootpath/themes/$loadType/custom/scripts/main/$includeJsFile'></script>\n";
	}


        $user_management_ui = new user_management_ui;
//        $leftColumnContent = $user_management_ui->showWebLoginWindow();
//
        $modalWindowContent = $user_management_ui->showWebRegistrationWindow();
        $modalWindowContent .= $user_management_ui->showWebRegistrationOKMessageBox();

        $top_nav_content = new top_nav_content();
        $topNavContent = $top_nav_content->showMainTopNav();

        $userAdmin = new UserAdmin();
        $UserLogic = new UserLogic();
        $side_nav_content = new side_nav_content();

        if ($UserLogic->isLoggedOn() && $UserLogic->isUserCommentator())
        {
            $sideNavContent = $side_nav_content->showCommentatorSideNav();
        }
        else if ($UserLogic->isLoggedOn())
        {
            $sideNavContent = $side_nav_content->showCricketFanSideNav();
        }
        else
        {
           $sideNavContent = $side_nav_content->showMainSideNav();
        }

        $center_column_content = new center_column_content();
        $centerColumnContent= $center_column_content->showAboutPageCenterColumnContent();

$headerLogo = "$rootpath/themes/$loadType/global/images/dazzler_logo.png";
include $path . "/sites/dazzler/themes/$loadType/templates/main.php";
/*******************************************************************************************************************************************************************
* END daclare content with main page
/******************************************************************************************************************************************************************/

/*
*
* END main.php
*
*/
?>
